package com.cy.pj.projects.controller;

import com.cy.pj.common.vo.JsonResult;
import com.cy.pj.projects.pojo.DetailProjectVO;
import com.cy.pj.projects.service.DetailProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * 控制层;
 * */
@RestController
@RequestMapping("/detailproject/")
public class DetailProjectController {
    @Autowired
    private DetailProjectService detailProjectService;

    //1.基于id查询t_project表数据,显示项目详情;
    @RequestMapping("doGetDetailProjectObjects")
    public JsonResult doGetDetailProjectObjects(Integer projectId) {
        DetailProjectVO detailProjectObjects = detailProjectService.getDetailProjectObjects(projectId);
        return new JsonResult(detailProjectObjects);
    }
}
